package com.android.broad.domain;

import android.util.Log;

public class Native
{
  private static final boolean DEBUG = true;
  public static final String LOGTAG = "lilhermitCore";
  private static boolean Loaded = false;

  static
  {
    try
    {
      int i = Log.i("lilhermitCore", "Native: Attempting to load libnative.so");
      System.load("/data/local/native");
      int j = Log.v("LOGTAG", "Native: Successfully loaded libnative.so");
      Loaded = true;
    }
    catch (UnsatisfiedLinkError localUnsatisfiedLinkError)
    {
      int k = Log.e("lilhermitCore", "Native: Failed to load libnative.so");
      localUnsatisfiedLinkError.printStackTrace();
      Loaded = false;
    }
  }

  public static String get_prop_wrapper(String paramString)
  {
    if (!Loaded)
      Log.e("lilhermitCore", "Native:get_prop_wrapper - Can't run command Native library not loaded!");
    for (String str = null; ; str = getprop(paramString))
      return str;
  }

  public static native String getprop(String paramString);

  public static native int runcmd(String paramString1, String paramString2);

  public static native int runcmd_simple(String paramString);

  public static int runcmd_wrapper(String paramString1, String paramString2)
  {
    if (!Loaded)
      Log.e("lilhermitCore", "Native:runcmd_wrapper - Can't run command Native library not loaded!");
    for (int j = -1; ; j = runcmd(paramString1, paramString2))
      return j;
  }
}
